package com.unionfetch.content_home.api

import com.unionfetch.content_home.bean.SumsubAccessToken
import com.unionftech.common.bean.ResponseResult
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.PATCH
import retrofit2.http.PUT
import retrofit2.http.Query

interface KYCApi {
    /**
     * 重置Sumsub用戶身分認證
     */
    @PUT("trade/user/trader/sumsub/reset")
    suspend fun resetSumsub(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * 重置Sumsub用戶身分認證(poa)
     */
    @PUT("trade/user/trader/sumsub/reset/poa")
    suspend fun resetSumsubPoa(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * 取得Sumsub poi AccessToken
     */
    @GET("trade/user/trader/sumsub/accessToken/poi")
    suspend fun getSumsubPoiToken(
        @Header("Authorization") token: String, @Query("userId") userId: String
    ): ResponseResult<SumsubAccessToken>

    /**
     * 取得Sumsub poa AccessToken
     */
    @GET("trade/user/trader/sumsub/accessToken/poa")
    suspend fun getSumsubPoaToken(
        @Header("Authorization") token: String, @Query("userId") userId: String
    ): ResponseResult<SumsubAccessToken>


    /**
     * sumsub poi上传成功之后，通知服务端更新数据
     */
    @PATCH("trade/user/trader/sumsub/poi")
    suspend fun notifyPoiResult(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * sumsub poa上传成功之后，通知服务端更新数据
     */
    @PATCH("trade/user/trader/sumsub/poa")
    suspend fun notifyPoaResult(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>


    /**
     * 手动上传poi身份认证
     */
    @PUT("trade/user/trader/poi")
    suspend fun uploadPoi(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * 手动补料poi
     */
    @PUT("trade/user/trader/supplement/poi")
    suspend fun supplementPoi(
        @Header("Authorization") token: String,
        @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * 手动上传poa身份认证
     */
    @PUT("trade/user/trader/poa")
    suspend fun uploadPoa(
        @Header("Authorization") token: String, @Body body: RequestBody
    ): ResponseResult<Any?>

    /**
     * 手动补料poa
     */
    @PUT("trade/user/trader/supplement/poa")
    suspend fun supplementPoa(
        @Header("Authorization") token: String,
        @Body body: RequestBody
    ): ResponseResult<Any?>


}